#include<bits/stdc++.h>
using namespace std;
int n,x,f[100010],ans;
int main(){
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>x; f[x]++;
    }
    for(int i=1;i<=1e5;i++)
        ans=max(ans,f[i]);
    if(ans==n) cout<<0<<"\n";
    else cout<<ans<<"\n";
    fclose(stdin);
    fclose(stdout);

    return 0;
}
